package org.wangblue;

import org.wangblue.concrete.BakeChickenWingCommand;
import org.wangblue.concrete.BakeMuttonCommand;
import org.wangblue.invoker.Waiter;
import org.wangblue.invoker.Waiter1;
import org.wangblue.receiver.Barcecuer;

/**
 * @Description: 运行类
 * @Author: WangBlue
 * @Create: 2024-09-24 10:32
 * @Version: 1.0
 **/

public class Main {
    public static void main(String[] args) {
        // 开店前的准备
        Barcecuer barcecuer = new Barcecuer(); // 有厨师
        BakeMuttonCommand muttonCommand = new BakeMuttonCommand(barcecuer); // 准备烤羊肉
        BakeChickenWingCommand chickenWingCommand = new BakeChickenWingCommand(barcecuer);  // 准备烤鸡翅
        // 服务员
        Waiter1 waiter = new Waiter1();

        // 开门营业，顾客点菜
        waiter.setOrder(muttonCommand);
        waiter.setOrder(chickenWingCommand);
        waiter.cancelOrder(muttonCommand);
        waiter.notifyCommand();
    }
}
